package com.tanhua.dubbo.server.api;

import com.tanhua.dubbo.server.pojo.Publish;
import com.tanhua.dubbo.server.pojo.Video;
import com.tanhua.dubbo.server.vo.CommentType;
import com.tanhua.dubbo.server.vo.PageInfo;

import java.util.List;

public interface VideoApi {

    /**
     * 关注用户
     *
     * @param userId 当前用户
     * @param followUserId 关注的目标用户
     * @return
     */
    Boolean followUser(Long userId, Long followUserId);

    /**
     * 取消关注用户
     *
     * @param userId 当前用户
     * @param followUserId 关注的目标用户
     * @return
     */
    Boolean disFollowUser(Long userId, Long followUserId);

    /**
     * 查询用户是否关注某个用户
     *
     * @param userId 当前用户
     * @param followUserId 关注的目标用户
     * @return
     */
    Boolean isFollowUser(Long userId, Long followUserId);

    /**
     * 小视频列表
     * @param userId
     * @param page
     * @param pageSize
     * @return
     */
    List<Video> findAllVideos(Long userId, Integer page, Integer pageSize);

    /**
     * 保存小视频
     * @param video
     * @return
     */
    String saveVideo(Video video);

    /**
     * 获取动态信息
     * @param userId
     * @param type
     * @return
     */
    public List<Publish> getPublishCommentLists(Long userId, CommentType type);

    /**
     * 获取所有的视频信息
     * @param page
     * @param pageSize
     * @param sortProp
     * @param sortOrder
     * @param uid
     * @return
     */
    PageInfo<Video> findAllVideoBackstage(Integer page, Integer pageSize, String sortProp, String sortOrder, Long uid);
}
